<template>
  <div class="video">
    <div class="title-wrapper">
      <span class="tag">MV</span>
      <span class="title">{{musicInfo.al.name}}</span>
      <span class="artist">{{musicInfo.ar | getArtists}}</span>
    </div>
    <video :src="videoUrl" controls></video>
  </div>
</template>

<script>
import axios from "axios";
export default {
  data() {
    return {
      videoUrl: "",
      musicInfo:""
    };
  },
  async created() {
    const id = this.$route.params.id;
    const res = await axios(`https://autumnfish.cn//mv/url?id=${id}&r=1080`);

    // 歌曲信息
    const resp = await axios("https://autumnfish.cn/song/detail?ids=" + id);
    this.musicInfo = resp.data.songs[0]
    console.log(this.musicInfo);

    this.videoUrl = res.data.data.url;
  },
};
</script>

<style>
@import url("../assets/css/video.css");
</style>